<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
        }
        .contianer{
            width: 400px;
            height: 400px;
        }

        div{
            width: 300px;
            height: 300px;
        }

        .boxx1{
            background-color: aqua;
        }
        .boxx2{
            background-color: red;
        }
        .boxx3{
            background-color: violet;
        }

        ul li{
            float: left;
            margin: 0 40px;
        }
    </style>
</head>
<body>
    <h3>浮动的定义</h3>
    <p>定义元素往哪个方向浮动</p>
    <ud>
        <li>left</li>
        <li>right</li>
    </ud>
    <p>浮动元素脱离了文档流， 只有左右没有上下</p>

    <h3>向左浮动</h3>
    <p>脱离文档流 相当于framelayout  相当于增加一个浮层放置内容，会出现折叠的层级现象</p>

    <!-- <div class="box">
        <p>标准流时有间隙</p>
        <img src="../../zhifbaoer.png" alt="" width="120px">
        <img src="../../weixiner.jpg" width="120px" alt="">
    </div>
    <div class="contianer">
        <p>标准流时有间隙</p>
        <img src="../../zhifbaoer.png" alt="" width="120px">
        <img src="../../weixiner.jpg" width="120px" alt="">
    </div> -->
   
    
    <div class="boxx1"></div>
    <div class="boxx2"></div>
    <div class="boxx3"></div>

    <br>
    <div>
        <p>当容器宽度不够，自动换行</p>
        <ul>
            <li>导航</li>
            <li>导航</li>
            <li>导航</li>
        </ul>

    </div>

    <div style="width: 800px;background-color: black;height: 1200px; ">
        <div class="boxx1" style="float: left;"></div>
        <div class="boxx2" style="float: left;"></div>
        <div class="boxx3" style="float: left;"></div>
    </div>


    <p><a href="清除浮动.html">清除浮动</a></p>
</body>
</html>